package org.nebuloop.photo.organizer.dao;

import java.sql.SQLException;
import java.util.List;

import org.nebuloop.photo.organizer.data.ImageInfo;
import org.nebuloop.photo.organizer.data.ImageSource;

/**
 * Data Access Object for accessing and storing meta-information about the the
 * image file.
 * 
 * Note that this meta information is different from EXIF information for the
 * image.
 */
public interface ImageDAO extends AutoCloseable {

  public void init() throws ClassNotFoundException, SQLException;

  public void saveImageInfo(ImageInfo imageInfo) throws SQLException;

  public void saveImageSourceInfo(ImageSource imageSrc) throws SQLException;

  public ImageInfo getImageByMD5(String md5) throws SQLException;

  public List<ImageSource> getImageSources(long image_id) throws SQLException;

  public int getDbImageCount() throws SQLException;
}
